package com.ruix.app.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.wifi.WifiManager;

import com.ruix.app.network.RequestManager;

/**
 * Created by hadexs on 2017/5/19.
 */

public class NetworkChangeBroacastReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        RequestManager.checkNetStatus();
//        Parcelable parcelableExtra = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
//        if (parcelableExtra != null) {
//            NetworkInfo networkInfo = (NetworkInfo) parcelableExtra;
//            if (networkInfo.isConnected()){
//                LocalEvent.dispatchNetworkChange();
//            }
//        }
//        //// TODO: 16/6/28 优化 只监听 打开网络，切换网络
    }


}
